<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<include file='Common:head'/>
<body>
<div class="place"> <span>位置：</span>
  <ul class="placeul">
    <li>首页</li>
    <li>轮播图片</li>
  </ul>
</div>
<form action="{:U('Banner/addDo')}" method="post" enctype="multipart/form-data">
<div class="formbody">
  <div class="formtitle"><span>基本信息</span></div>
  <ul class="forminfo">
    <li>
      <label>幻灯片</label>
        <input type="file" name="pic" id='pic'/>
    </li> 
	<li>
        <label>名称</label>
        <input name="name" type="text" class="dfinput" />
        <i>标题不能超过200个字符</i>
    </li>
    <li>
        <label>连接</label>
        <input name="url" type="text" class="dfinput" value="/"/>
        <i>填链接请讲 http:// 协议加上否则无法显示  ！ 不填将默认链接首页面  </i>
    </li>
    <li>
        <label>排序</label>
        <input name="sort" type="text" class="dfinput" style="width:50px;" value="0"/>
        <i>请填写小于 4 位的数字</i>
    </li>
	<li>
      <label>&nbsp;</label>
      <input name="" id='button' type="submit" class="btn" value="确认保存"/>
    </li>
  </ul>
</div>
</form>
<div style="margin-left:40px;">
<foreach name='banner' item='v'>
	<div style="width:200px; height:auto; float:left; margin-bottom:31px; margin-right:5px;">
        <div>
        
    <if condition=" $v['pic'] eq '' "><img src="<?php echo C('NO_PIC');?>" width="200" height="150">
        <else /><img src="__ROOT__/{$v['pic']}" width="200" height="150">
    </if>
        
        </div>
        <a href="{:U('Banner/edit',array('id'=>$v['id']))}">
        <span style="width:50px; height:25px; background:#3D95C9; float:left; color:#FFF; line-height:25px; text-align:center; margin-bottom:-30px;">编辑</span>
        </a>
        <a href="{:U('Banner/del',array('id'=>$v['id']))}" onclick="return confirm('确实要删除吗？')">
        <span style="width:50px; height:25px; background:#3D95C9; float:right; color:#FFF; line-height:25px; text-align:center; margin-bottom:-30px;">删除</span></a>
    </div>
</foreach>
</div>
</body>
</html>
